//
//  TalkRecordingView.h
//  talkDemo
//
//  Created by telen on 15/4/21.
//  Copyright (c) 2015年 刘赞黄Telen. All rights reserved.
//

#import "TalkBaseView.h"

typedef enum : NSUInteger {
    TalkRecordingStatus_none,
    TalkRecordingStatus_begin,
    TalkRecordingStatus_Question1,
    TalkRecordingStatus_Answer1,
    TalkRecordingStatus_Question2,
    TalkRecordingStatus_Answer2,
    TalkRecordingStatus_Question3,
    TalkRecordingStatus_Answer3,
    TalkRecordingStatus_end
} TalkRecordingStatus;

struct RecordingTimeInfo_ {
    NSTimeInterval time_from; //tick count time
    NSTimeInterval time_to;
    NSTimeInterval pTime_1;
    NSTimeInterval pTime_2;
};
typedef struct RecordingTimeInfo_ RecordingTimeInfo;


@class TalkRecordingView;

@protocol TalkRecordingViewDelegate <NSObject>

@optional
- (void)talkRecordingView_Countdown_Start:(TalkRecordingView*)recordingView;
- (void)talkRecordingView:(TalkRecordingView*)recordingView questionBegin_Index:(NSUInteger)index;
- (void)talkRecordingView:(TalkRecordingView*)recordingView questionEnd_Index:(NSUInteger)index;
- (void)talkRecordingView:(TalkRecordingView*)recordingView answerBegin_Index:(NSUInteger)index;
- (void)talkRecordingView:(TalkRecordingView*)recordingView answerEnd_Index:(NSUInteger)index;
- (void)talkRecordingView_Countdown_Stop:(TalkRecordingView*)recordingView;

@required
- (NSString*)talkRecordingView:(TalkRecordingView*)recordingView mp4ForQuestionIndex:(NSUInteger)index;
- (NSString*)talkRecordingView:(TalkRecordingView*)recordingView mp3ForQuestionIndex:(NSUInteger)index;

@end

@interface TalkRecordingView : TalkBaseView

+ (TalkRecordingView*) TalkRecordingQuestion:(NSArray*)qarr ratio:(CGFloat)ratio_w recordingTime:(RecordingTimeInfo)recordInfo;

@property(nonatomic,weak)id<TalkRecordingViewDelegate> delegate;
@property(nonatomic,readonly)TalkRecordingStatus recordingStatus;

@property(nonatomic,readonly)UIButton* stopRecordBtn;
@property(nonatomic,readonly)UIButton* finishBtn;
@property(nonatomic,readonly)UIButton* reRecordBtn;

@property(nonatomic,readonly)UIButton* nextBtn;

- (void)stopRecord;

@end
